﻿using System;
using System.Collections.Generic;
using System.Text;
using NUnit.Framework;

namespace openxmlconv
{
    [TestFixture]
    public class StyleFixture
    {
        [Test]
        public void TestEquality()
        {
            Style s1 = Style.create("name", "family", "parent");
            Style s2 = Style.create("name", "family", "parent");
            Assert.AreEqual(s1, s2);
        }
        [Test]
        public void TestEqualityNull()
        {
            Style s1 = Style.create("name", "family", "parent");
            Style s2 = null;
            Assert.AreNotEqual(s1, s2);
        }
        [Test]
        public void TestNull()
        {
            Style s1 = null;
            Style s2 = null;
            Assert.AreEqual(s1, s2);
        }
        [Test]
        public void TestDiffNames()
        {
            Style s1 = Style.create("name", "family", "parent");
            Style s2 = Style.create("name2", "family", "parent");
            Assert.AreNotEqual(s1, s2);
            Assert.AreNotEqual(s2, s1);
        }
        [Test]
        public void TestDiffFamilies()
        {
            Style s1 = Style.create("name", "family", "parent");
            Style s2 = Style.create("name", "family2", "parent");
            Assert.AreNotEqual(s1, s2);
            Assert.AreNotEqual(s2, s1);
        }
        [Test]
        public void TestDiffParents()
        {
            Style s1 = Style.create("name", "family", "parent");
            Style s2 = Style.create("name", "family", "parent2");
            Assert.AreNotEqual(s1, s2);
            Assert.AreNotEqual(s2, s1);
        }
        [Test]
        public void TestAlignment()
        {
            Style s = Style.create("name", "family", "parent");
            s.setAlignment("end");
            Assert.AreEqual(s.getAlignment(), "end");
        }


    }
}
